package cn.java89.configclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author oldliu
 * @since 1.0
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Value("${data.env}")
    private String env;
    @Value("${data.user.username}")
    private String name;

    @Value("${data.user.password}")
    private String pass;

    @GetMapping("/index")
    public String sayHello() {
        return "{" + env + "," + name + "," + pass + "}";
    }
}
